/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package DBLag;
import ModelLag.Employee;
import java.sql.*;
import java.util.ArrayList;

/**
 *
 * @author Ronni
 */
public interface IFDbEmployee {
        /**Finds a Employee in the database from a given cprNo
     * @param cprNo 
     * @return Employee
     */
    public Employee findEmployee(String cprNo);
    /**Searches for a Employee in the database, with the string "searchString"
     * @param searchString 
     * @return Employee
     */    
    public ArrayList<Employee> searchEmployee(String searchString);
    /**Retrieves all the Employee in the database
     * @param 
     * @return ArrayList<Employee>
     */    
    public ArrayList<Employee> getAllEmployees();
    /**inserts the Employee in the database
     * @param employee 
     * @return returnCode
     */        
    public int insertEmployee(Employee employee) throws SQLException;
    /**updates the Employee in the database
     * @param employee 
     * @return returnCode
     */            
    public int updateEmployee(Employee employee) throws SQLException;
    /**deletes the Employee from the database
     * @param employee
     * @return returnCode
     */            
    public int deleteEmployee(Employee employee) throws SQLException;
    /**builds an Employee object from the Resultset retrieved from a query
     * @param results
     * @return Employee object
     */            
    
    public int toggleActive(String cprNo) throws SQLException;
}
